<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<jsp:include page="../../comunes/header.jsp" />
<h2>Nueva Tarea de Checklist</h2>
<form:form method="POST" modelAttribute="tarea">
   <table class="tbl_formulario">
      <tr>         <th>Tipo de Trabajo</th>
         <td><form:select path="llave.claveTipoTrabajo" items="${tiposTrabajo}" 
                      itemValue="clave" itemLabel="descripcion"/></td>
      </tr>
      <tr><th>Clave:</th>
         <td><form:input path="llave.claveTarea" size="4" maxlength="4" id="_clave"/>
            <form:errors path="llave.claveTarea" cssClass="error" /></td>
      </tr>
      <tr><th>Descripci&oacute;n:</th>
         <td><form:input path="descripcion" size="30" maxlength="100"/>
            <form:errors path="descripcion" cssClass="error" /></td>
      </tr>
      <tr><th>Decripci&oacute;n Corta:</th>
         <td><form:input path="descripcionCorta" size="15" maxlength="15"/>
            <form:errors path="descripcionCorta" cssClass="error" /></td>
      </tr>
      <tr>
         <td><button type="reset" class="btn_regresar" title="Regresar">Regresar</button></td>
         <td><button type="submit" class="btn_guardar" title="Guardar">Guardar</button></td>
      </tr>
   </table>
</form:form>
<c:url var="regrUrl" value="/catalogos/tareas" />
<script type="text/javascript">
   $(document).ready(function() {
      $("#clave").focus();
      $(".btn_regresar").click(function() {
         window.location.replace('${regrUrl}');
      });
   });
</script>
<jsp:include page="../../comunes/footer.jsp" />